package com.lwc.config;

import org.springframework.amqp.core.AbstractExchange;

import java.util.HashMap;
import java.util.Map;

/**
 * 自定义延迟交换器     x-delayed-message   路由的类型      direct 指定路由交换器
 */
public class LazyExchange extends AbstractExchange {

    private final String type="x-delayed-message";

    static Map<String,Object>argsmap;
    static {
        Map<String,Object>argsmap=new HashMap<>();
        argsmap.put("x-delayed-type","direct");
    }

    public LazyExchange(String name) {
        super(name,true,false,argsmap);

    }



    @Override
    public String getType() {
        return this.type;
    }


}
